package org.jeecg.common.exception;

import org.apache.shiro.authc.AuthenticationException;
import org.jeecg.common.constant.ErrorMsg;

public class JeecgBootException extends AuthenticationException {
	private static final long serialVersionUID = 1L;

	private ErrorMsg errorMsg;

	private int code = -1;

	private String msg;



	public JeecgBootException(String message){
		super(message);
	}
	
	public JeecgBootException(Throwable cause)
	{
		super(cause);
	}
	
	public JeecgBootException(String message,Throwable cause)
	{
		super(message,cause);
	}


	public JeecgBootException(ErrorMsg errorMsg){
		super(errorMsg.getMsg());
		this.errorMsg = errorMsg;
	}

	public JeecgBootException(int code, String msg){
		super(msg);
		this.code = code;
		this.msg = msg;
	}

	public ErrorMsg getErrorMsg() {
		return errorMsg;
	}

	public int getCode() {
		return code;
	}

	public String getMsg() {
		return msg;
	}
}
